home *** CD-ROM | disk | FTP | other *** search
/ Ultra Pack / UltraComputing Partner Applications.iso / Adobe / INSTALL < prev    next >
Text File  |  1995-11-01  |  17KB  |  818 lines

  1. #!/bin/sh
  2. #
  3. # vi:set ts=40 sw=2:
  4. #
  5. # Install Script for UNIX Acrobat Exchange and Reader v. 2.0
  6. #
  7. # Copyright (c)1995, Adobe Systems Incorporated
  8. # All Rights Reserved
  9. #
  10. # High Level Design:
  11. #
  12. # Initialization
  13. # Output License to controlling terminal
  14. # Does the user accept the terms and conditions of the license?
  15. #   No: exit
  16. #   Yes: continue
  17. # Enumerate all of the configurations
  18. # If just one configuration
  19. #   Do an easy installation
  20. # else
  21. #   Do a custom installation
  22. #
  23.  
  24. ##########################################################################
  25.  
  26. echoawk ()
  27. {
  28.   echo $* | awk '{ printf "%s", $0 }'
  29. }
  30.  
  31. echon ()
  32. {
  33.   echo -n "$*"
  34. }
  35.  
  36. echoc ()
  37. {
  38.   echo "${*}\c"
  39. }
  40.  
  41. ##########################################################################
  42.  
  43. yesno()
  44. {
  45.   msg="$1"
  46.   def="$2"
  47.   while true ; do
  48.     echo " "
  49.     $echonl "$msg"
  50.     read answer
  51.     if [ "$answer" ] ; then
  52.       case "$answer" in
  53.         y|Y|yes|YES)
  54.           return 0
  55.           ;;
  56.         n|N|no|NO)
  57.           return 1
  58.           ;;
  59.         *)
  60.           echo " "
  61.           echo "ERROR: Invalid response, expected \"yes\" or \"no\"."
  62.           continue
  63.           ;;
  64.       esac
  65.     else
  66.       return $def
  67.     fi
  68.   done
  69. }
  70.  
  71. OutputLicense ()
  72. {
  73.   if [ -z "$1" ] ; then
  74.     return
  75.   fi
  76.  
  77.   if [ ! -f "$1" ] ; then
  78.     echo " "
  79.     echo "ERROR: Cannot find license file ... aborting"
  80.     echo " "
  81.     exit 1
  82.   fi
  83.  
  84.   if [ -z "$PAGER" ] || [ "`type $PAGER`" = "$PAGER not found" ] ; then
  85.     if [ "`type more`" != "more not found" ] ; then
  86.       command=more
  87.     elif [ "`type pg`" != "pg not found" ] ; then
  88.       command=pg
  89.     else
  90.       command=cat
  91.     fi
  92.   else
  93.     command="$PAGER"
  94.   fi
  95.  
  96.   echo " "
  97.   "$command" "$1"
  98.  
  99.   answer=
  100.   while [ -z "$answer" ] ; do
  101.     echo " "
  102.     echo " "
  103.     echo "To accept the terms and conditions of this agreement enter \"accept\"."
  104.     echo "To decline the terms and conditions of this agreement enter \"decline\"."
  105.     echo " "
  106.     $echonl "Do you accept the terms and conditions of this license agreement? "
  107.     read answer
  108.     ucanswer=`echo "${answer}" | tr '[a-z]' '[A-Z]'`
  109.     case "$ucanswer" in
  110.     ACCEPT)
  111.       ;;
  112.     DECLINE)
  113.       echo " "
  114.       echo "License not accepted ... aborting installation"
  115.       echo " "
  116.       exit 1
  117.       ;;
  118.     *)
  119.       echo " "
  120.       echo "ERROR: Invalid response, expected \"accept\" or \"decline\" ... try again"
  121.       answer=
  122.       ;;
  123.     esac
  124.   done
  125. }
  126.  
  127. PrintRequiredFree()
  128. {
  129.   total=0
  130.   for i in $* ; do
  131.     if [ "$i" -a -f "$i" ] ; then
  132.       size=`ls -lLon "$i" | ( read perm links owner size date ; echo $size )`
  133.       if [ "$size" ] ; then
  134.         total=`expr $total + $size`
  135.       fi
  136.     fi
  137.   done
  138.  
  139.   megs=`expr $total / 1048576 + 1`
  140.  
  141.   echo " "
  142.   echo "This installation requires ${megs}MB of free disk space."
  143. }
  144.  
  145. FilterPathName ()
  146. {
  147.   newpathname="$1"
  148.   case "$newpathname" in
  149.     ~*)
  150.       if [ -f /bin/csh -a -x /bin/csh ] ; then
  151.         newpathname=`/bin/csh -c "echo $newpathname"`
  152.       fi
  153.       ;;
  154.     ../*|./*)
  155.       newpathname=`pwd`/"${newpathname}"
  156.       ;;
  157.     *)
  158.       ;;
  159.   esac
  160.   echo "${newpathname}"
  161. }
  162.  
  163. ExtractFiles ()
  164. {
  165.   ( cd "$1" ; tar xf "$2" )
  166. }
  167.  
  168. InstallFiles ()
  169. {
  170.   msg="$1"
  171.   install="$2"
  172.   shift
  173.   shift
  174.  
  175.   echo " "
  176.  
  177.   for i in "$@" ; do
  178.     if [ "$i" ] ; then
  179.       if [ "$msg" ] ; then
  180.         $echonl "$msg"
  181.         msg=""
  182.       fi
  183.       ExtractFiles "$install" "$i"
  184.     fi
  185.   done
  186.  
  187.   if [ -z "$msg" ] ; then
  188.     echo "Done"
  189.   fi
  190. }
  191.  
  192. InstallBin()
  193. {
  194.   install="$1"
  195.  
  196.   for i in "$install"/bin/acro*.sh ; do
  197.     if [ -f "$i" ] ; then
  198.       filename="$install"/bin/`basename "$i" .sh`
  199.  
  200.       ed -s "$i" <<__EOF__
  201.         1,\$s@REPLACE_ME@$install@
  202.         w
  203.         q
  204. __EOF__
  205.       if [ $? != 0 ] ; then
  206.         echo "ERROR installing $filename"
  207.         continue
  208.       fi
  209.  
  210.       chmod +x "$i"
  211.       if [ $? != 0 ] ; then
  212.         echo "ERROR installing $filename"
  213.         continue
  214.       fi
  215.  
  216.       mv "$i" "$filename"
  217.       if [ $? != 0 ] ; then
  218.         echo "ERROR installing $filename"
  219.         continue
  220.       fi
  221.     fi
  222.   done
  223. }
  224.  
  225. GetInstallDirectory ()
  226. {
  227.   if [ -z "$1" ] ; then
  228.     product=Acrobat
  229.   else
  230.     product="$1"
  231.   fi
  232.  
  233.   var=$2
  234.  
  235.   case "$product" in
  236.     AcroExch) productName="Acrobat Exchange" ;;
  237.     AcroRead) productName="Acrobat Reader" ;;
  238.     *) productName="Acrobat" ;;
  239.   esac
  240.  
  241.   defdir="/usr/local/$product"
  242.   case "$OSname" in
  243.     SunOS)
  244.       case "$OSrelease" in
  245.         4.1.3*|4.1.4*) defdir="/usr/$product" ;;
  246.         5.*) defdir="/opt/$product" ;;
  247.       esac
  248.       ;;
  249.     HP-UX)
  250.       case "$OSrelease" in
  251.         *.09.*) defdir="/usr/$product" ;;
  252.         *.10.*) defdir="/opt/$product" ;;
  253.         *) defdir="/opt/$product" ;;
  254.       esac
  255.       ;;
  256.   esac
  257.  
  258.   while true ; do
  259.  
  260.     if [ -z "$InstallDir" ] ; then
  261.       InstallDir="$defdir"
  262.     fi
  263.  
  264.     echo " "
  265.     $echonl "Enter installation directory for $product [${InstallDir}] "
  266.     read answer
  267.     case "$answer" in
  268.       "")
  269.         ;;
  270.       *)
  271.         InstallDir="$answer"
  272.         ;;
  273.     esac
  274.  
  275.     InstallDir=`FilterPathName "$InstallDir"`
  276.  
  277.     if [ ! -d "$InstallDir" ] ; then
  278.       echo " "
  279.       $echonl "Directory \"$InstallDir\" does not exist create it now? [y] "
  280.       read answer
  281.       if [ "$answer" ] ; then
  282.         case "$answer" in
  283.           y|Y|yes|YES)
  284.             ;;
  285.           n|N|no|NO)
  286.             echo " "
  287.             echo "Acrobat installation aborted."
  288.             echo " "
  289.             exit 1
  290.             ;;
  291.           *)
  292.             echo " "
  293.             echo "ERROR: Invalid response, expected \"yes\" or \"no\"."
  294.             continue
  295.             ;;
  296.         esac
  297.       fi
  298.  
  299.       mkdir -p "$InstallDir"
  300.  
  301.       if [ ! -d "$InstallDir" ] ; then
  302.         echo " "
  303.         echo "ERROR: Cannot make directory \"$InstallDir\"."
  304.         InstallDir=""
  305.         continue;
  306.       fi
  307.     fi
  308.  
  309.     if ( echo foo > "$InstallDir"/AcroWriteTest ) 2> /dev/null ; then
  310.       rm -f "$InstallDir"/AcroWriteTest
  311.       break
  312.     else
  313.       echo " "
  314.       echo "ERROR: Cannot write to directory \"$InstallDir\"."
  315.       InstallDir=""
  316.       continue
  317.     fi
  318.   done
  319.  
  320.   eval $var=\"$InstallDir\"
  321. }
  322.  
  323. CheckSerialNumber()
  324. {
  325.   p1="^[a-zA-Z]\{3\}[0-9]\{3\}[a-zA-Z0-9]\{2\}[0-9]\{6\}-[0-9]\{3\}$"
  326.   p2="^[a-zA-Z]\{3\}[0-9]\{3\}[a-zA-Z0-9]\{2\}[0-9]\{6\}-[0-9]\{3\}-[0-9]\{3\}$"
  327.  
  328.   if [ `expr "$1" : "$p1"` != 0 ] \
  329.   || [ `expr "$1" : "$p2"` != 0 ] ; then
  330.     return 0
  331.   fi
  332.  
  333.   return 1
  334. }
  335.  
  336. GetSerialNumber()
  337. {
  338.   dir="$2"
  339.   file="$2/${1}Data"
  340.  
  341.   while true ; do
  342.     echo " "
  343.     $echonl "Enter product serial number? "
  344.     read sn
  345.     if CheckSerialNumber "$sn" ; then
  346.       break
  347.     fi
  348.     echo " "
  349.     echo "ERROR: Invalid serial number ... try again"
  350.   done
  351.  
  352.   echo " "
  353.   $echonl "Enter company name? "
  354.   read co
  355.  
  356.   if [ ! -d "$dir" ] ; then
  357.     mkdir "$dir"
  358.   fi
  359.  
  360.   rm -f "$file"
  361.   echo "serialNumber:$sn" > "$file"
  362.   echo "companyName:$co" >> "$file"
  363. }
  364.  
  365.  
  366. InstallReader()
  367. {
  368.   ReadConfig="$1"
  369.   ReadPlatformTar="$2"
  370.   SearchPlatformTar="$3"
  371.   CustomPlatformTar="$4"
  372.   dosearch=no
  373.  
  374.   if [ "$SearchTar" -o "$CustomTar" -o "$SearchPlatformTar" -o "$CustomPlatformTar" ] ; then
  375.     if [ "$SerialNumber" ] ; then
  376.       dosearch=yes
  377.     else
  378.       echo ""
  379.       echo "WARNING: This Acrobat Reader installation does not include Acrobat Search."
  380.       if yesno "Proceed with installation? [y] " 0 ; then
  381.         :
  382.       else
  383.         exit 1
  384.       fi
  385.     fi
  386.   fi
  387.  
  388.   OutputLicense "$ReadLicense"
  389.   ReadLicense=""
  390.  
  391.   if [ "$dosearch" = yes ] ; then
  392.  
  393.     PrintRequiredFree "$ReadTar" "$SearchTar" "$CustomTar" \
  394.       "$ReadPlatformTar" "$SearchPlatformTar" "$CustomPlatformTar"
  395.  
  396.     if [ -z "$ReadInstallDir" ] ; then
  397.       GetInstallDirectory AcroRead ReadInstallDir
  398.     fi
  399.  
  400.     InstallFiles "Installing platform independent files ... " \
  401.       "$ReadInstallDir" "$ReadTar" "$SearchTar" "$CustomTar"
  402.     InstallFiles "Installing platform dependent files ... " \
  403.       "$ReadInstallDir" \
  404.       "$ReadPlatformTar" "$SearchPlatformTar" "$CustomPlatformTar"
  405.     InstallBin "$ReadInstallDir"
  406.  
  407.     ReadTar=""
  408.     SearchTar=""
  409.     CustomTar=""
  410.  
  411.     if [ "$SerialNumber" ] ; then
  412.       dir="$ReadInstallDir/$ReadConfig"
  413.  
  414.       if [ ! -d "$dir" ] ; then
  415.         mkdir "$dir"
  416.       fi
  417.  
  418.       rm -f "$dir/AcroReadData"
  419.       echo "serialNumber:$SerialNumber" > "$dir/AcroReadData"
  420.     fi
  421.  
  422.   else
  423.  
  424.     PrintRequiredFree "$ReadTar" "$ReadPlatformTar"
  425.  
  426.     if [ -z "$ReadInstallDir" ] ; then
  427.       GetInstallDirectory AcroRead ReadInstallDir
  428.     fi
  429.  
  430.     InstallFiles "Installing platform independent files ... " \
  431.       "$ReadInstallDir" "$ReadTar"
  432.     InstallFiles "Installing platform dependent files ... " \
  433.       "$ReadInstallDir" "$ReadPlatformTar"
  434.     InstallBin "$ReadInstallDir"
  435.  
  436.     ReadTar=""
  437.  
  438.   fi
  439. }
  440.  
  441.  
  442. InstallExchange()
  443. {
  444.   ExchConfig="$1"
  445.   ExchPlatformTar="$2"
  446.   SearchPlatformTar="$3"
  447.   CustomPlatformTar="$4"
  448.  
  449.   OutputLicense "$ExchLicense"
  450.   ExchLicense=""
  451.  
  452.   PrintRequiredFree "$ExchTar $SearchTar $CustomTar" \
  453.     "$ExchPlatformTar" "$SearchPlatformTar" "$CustomPlatformTar"
  454.  
  455.   if [ -z "$ExchInstallDir" ] ; then
  456.     GetInstallDirectory AcroExch ExchInstallDir
  457.   fi
  458.  
  459.   GetSerialNumber AcroExch "$ExchInstallDir/$ExchConfig"
  460.  
  461.   InstallFiles "Installing platform independent files ... " \
  462.     "$ExchInstallDir" "$ExchTar" "$SearchTar" "$CustomTar"
  463.   InstallFiles "Installing platform dependent files ... " \
  464.     "$ExchInstallDir" \
  465.     "$ExchPlatformTar" "$SearchPlatformTar" "$CustomPlatformTar"
  466.   InstallBin "$ExchInstallDir"
  467.  
  468.   ExchTar=""
  469.   SearchTar=""
  470.   CustomTar=""
  471. }
  472.  
  473. ##############################################################
  474.  
  475. #
  476. # Initialization:
  477. #
  478.  
  479. umask 022
  480.  
  481. ScriptName=`basename $0`
  482. CurrentDirectory=`pwd`
  483. ScriptDirectory=`dirname $0`
  484. case "${ScriptDirectory}" in
  485.   /*) ;;
  486.   .) ScriptDirectory="$CurrentDirectory" ;;
  487.   *) ScriptDirectory="$CurrentDirectory"/"$ScriptDirectory" ;;
  488. esac
  489.  
  490. if [ "`type uname`" != "uname not found" ] ; then
  491.   OSname=`uname -s`
  492.   OSrelease=`uname -r`
  493. else
  494.   OSname=unknown
  495.   OSrelease=unknown
  496. fi
  497.  
  498. if [ `echo "x\c"` = "x" ] ; then
  499.   echonl=echoc
  500. else
  501.   echonl=echon
  502. fi
  503.  
  504. #
  505. # Get the filenames:
  506. #
  507.  
  508. for i in ${ScriptDirectory}/* ; do
  509.   if [ -f "$i" ] ; then
  510.     case $i in
  511.       */sernum.txt|*/SERNUM.TXT)
  512.         a="`cat "$i" | tr '\015' '\012' | ( read a b ; echo $a )`"
  513.         if CheckSerialNumber "$a" ; then
  514.           SerialNumber="$a"
  515.         fi
  516.         ;;
  517.       */licread.txt|*/LICREAD.TXT)
  518.         ReadLicense="$i"
  519.         ;;
  520.       */licexch.txt|*/LICEXCH.TXT)
  521.         ExchLicense="$i"
  522.         ;;
  523.       */read.tar|*/READ.TAR)
  524.         ReadTar="$i"
  525.         ;;
  526.       */exch.tar|*/EXCH.TAR)
  527.         ExchTar="$i"
  528.         ;;
  529.       */search.tar|*/SEARCH.TAR)
  530.         SearchTar="$i"
  531.         ;;
  532.       */custom.tar|*/CUSTOM.TAR)
  533.         CustomTar="$i"
  534.         ;;
  535.       */ssole.tar|*/SSOLE.TAR)
  536.         ExchSparcSolarisTar="$i"
  537.         ;;
  538.       */ssolr.tar|*/SSOLR.TAR)
  539.         ReadSparcSolarisTar="$i"
  540.         ;;
  541.       */ssols.tar|*/SSOLS.TAR)
  542.         SearchSparcSolarisTar="$i"
  543.         ;;
  544.       */ssolc.tar|*/SSOLC.TAR)
  545.         CustomSparcSolarisTar="$i"
  546.         ;;
  547.       */ssune.tar|*/SSUNE.TAR)
  548.         ExchSparcSunTar="$i"
  549.         ;;
  550.       */ssunr.tar|*/SSUNR.TAR)
  551.         ReadSparcSunTar="$i"
  552.         ;;
  553.       */ssuns.tar|*/SSUNS.TAR)
  554.         SearchSparcSunTar="$i"
  555.         ;;
  556.       */ssunc.tar|*/SSUNC.TAR)
  557.         CustomSparcSunTar="$i"
  558.         ;;
  559.       */hpuxe.tar|*/HPUXE.TAR)
  560.         ExchHppaHpuxTar="$i"
  561.         ;;
  562.       */hpuxr.tar|*/HPUXR.TAR)
  563.         ReadHppaHpuxTar="$i"
  564.         ;;
  565.       */hpuxs.tar|*/HPUXS.TAR)
  566.         SearchHppaHpuxTar="$i"
  567.         ;;
  568.       */hpuxc.tar|*/HPUXC.TAR)
  569.         CustomHppaHpuxTar="$i"
  570.         ;;
  571.     esac
  572.   fi
  573. done
  574.  
  575.  
  576. #
  577. # Validate the configurations:
  578. #
  579.  
  580. NumConfigs=0
  581.  
  582. if [ "$ExchTar" -a "$ExchLicense" ] ; then
  583.   if [ "$ExchSparcSolarisTar" ] ; then
  584.     NumConfigs=`expr $NumConfigs + 1`
  585.     ExchSparcSolarisNum=$NumConfigs
  586.   fi
  587.   if [ "$ExchSparcSunTar" ] ; then
  588.     NumConfigs=`expr $NumConfigs + 1`
  589.     ExchSparcSunNum=$NumConfigs
  590.   fi
  591.   if [ "$ExchHppaHpuxTar" ] ; then
  592.     NumConfigs=`expr $NumConfigs + 1`
  593.     ExchHppaHpuxNum=$NumConfigs
  594.   fi
  595. fi
  596.  
  597. if [ "$ReadTar" -a "$ReadLicense" ] ; then
  598.   if [ "$ReadSparcSolarisTar" ] ; then
  599.     NumConfigs=`expr $NumConfigs + 1`
  600.     ReadSparcSolarisNum=$NumConfigs
  601.   fi
  602.   if [ "$ReadSparcSunTar" ] ; then
  603.     NumConfigs=`expr $NumConfigs + 1`
  604.     ReadSparcSunNum=$NumConfigs
  605.   fi
  606.   if [ "$ReadHppaHpuxTar" ] ; then
  607.     NumConfigs=`expr $NumConfigs + 1`
  608.     ReadHppaHpuxNum=$NumConfigs
  609.   fi
  610. fi
  611.  
  612. if [ "$NumConfigs" = "0" ] ; then
  613.   echo " "
  614.   echo "ERROR: No configurations found ... aborting"
  615.   echo " "
  616.   exit 1
  617. elif [ "$NumConfigs" = "1" ] ; then
  618.   SingleConfig=true
  619. fi
  620.  
  621. NumConfigs=`expr $NumConfigs + 1`
  622. ExitNum=$NumConfigs
  623.  
  624.  
  625. #
  626. # Check if there is a configuration supported by this OS.
  627. #
  628.  
  629. case "$OSname" in
  630.   SunOS)
  631.     case "$OSrelease" in
  632.       4.1.3*|4.1.4*)
  633.         ExchDefaultNum="$ExchSparcSunNum"
  634.         ReadDefaultNum="$ReadSparcSunNum"
  635.         DefaultName="SPARC/Solaris 1.x"
  636.         ;;
  637.       5.1|5.1.*|5.2|5.2.*)
  638.         ;;
  639.       5.*)
  640.         ExchDefaultNum="$ExchSparcSolarisNum"
  641.         ReadDefaultNum="$ReadSparcSolarisNum"
  642.         DefaultName="SPARC/Solaris 2.x"
  643.         ;;
  644.     esac
  645.     ;;
  646.   HP-UX)
  647.     case "$OSrelease" in
  648.       *.09.*|*.10.*)
  649.         ExchDefaultNum="$ExchHppaHpuxNum"
  650.         ReadDefaultNum="$ReadHppaHpuxNum"
  651.         DefaultName="HP-UX"
  652.         ;;
  653.     esac
  654.     ;;
  655. esac
  656.  
  657. if [ -z "$ExchDefaultNum" -a -z "$ReadDefaultNum" ] ; then
  658.   echo ""
  659.   echo "WARNING: The current OS ($OSname/$OSrelease) is not supported."
  660.   if yesno "Continue installation? [n] " 1 ; then
  661.     :
  662.   else
  663.     exit 1
  664.   fi
  665. fi
  666.  
  667.  
  668. #
  669. # If multiple confurations, get the default configuration
  670. #
  671.  
  672. if [ -z "$SingleConfig" ] ; then
  673.   if [ "$ExchDefaultNum" ] ; then
  674.     if yesno "Install default configuration, Acrobat Exchange for $DefaultName? [y] " 0 ; then
  675.       DefaultConfig="$ExchDefaultNum"
  676.     fi
  677.   elif [ "$ReadDefaultNum" ] ; then
  678.     if yesno "Install default configuration, Acrobat Reader for $DefaultName? [y] " 0 ; then
  679.       DefaultConfig="$ReadDefaultNum"
  680.     fi
  681.   fi
  682. fi
  683.  
  684.  
  685. #
  686. # If a single configuration available the loop will be executed once
  687. # otherwise it will ask for each configuration to install
  688. #
  689.  
  690. while [ "$NumConfigs" -gt 1 ] ; do
  691.  
  692.   #
  693.   # If multiple configuration ask for which to install
  694.   #
  695.  
  696.   if [ "$SingleConfig" ] ; then
  697.  
  698.     ConfigNum=1
  699.  
  700.   elif [ "$DefaultConfig" ] ; then
  701.  
  702.     ConfigNum="$DefaultConfig"
  703.  
  704.   else
  705.  
  706.     #
  707.     # Display multiple configurations
  708.     #
  709.  
  710.     echo " "
  711.     echo "The following configurations are available for installation:"
  712.     echo " "
  713.  
  714.     if [ "$ExchSparcSolarisNum" ] ; then
  715.       echo "  ${ExchSparcSolarisNum}. Acrobat Exchange for SPARC/Solaris 2.x"
  716.     fi
  717.     if [ "$ExchSparcSunNum" ] ; then
  718.       echo "  ${ExchSparcSunNum}. Acrobat Exchange for SPARC/Solaris 1.x"
  719.     fi
  720.     if [ "$ExchHppaHpuxNum" ] ; then
  721.       echo "  ${ExchHppaHpuxNum}. Acrobat Exchange for HP-UX"
  722.     fi
  723.  
  724.     if [ "$ReadSparcSolarisNum" ] ; then
  725.         echo "  ${ReadSparcSolarisNum}. Acrobat Reader for SPARC/Solaris 2.x"
  726.     fi
  727.     if [ "$ReadSparcSunNum" ] ; then
  728.         echo "  ${ReadSparcSunNum}. Acrobat Reader for SPARC/Solaris 1.x"
  729.     fi
  730.     if [ "$ReadHppaHpuxNum" ] ; then
  731.         echo "  ${ReadHppaHpuxNum}. Acrobat Reader for HP-UX"
  732.     fi
  733.     if [ "$ExitNum" ] ; then
  734.         echo "  ${ExitNum}. Exit Acrobat installation"
  735.     fi
  736.  
  737.     echo " "
  738.     $echonl "Enter the configuration number to install: "
  739.     read ConfigNum
  740.  
  741.   fi
  742.  
  743.  
  744.   #
  745.   # Install the configuration
  746.   #
  747.  
  748.   if [ -z "$ConfigNum" ] ; then
  749.  
  750.     echo " "
  751.     echo "ERROR: Invalid response ... try again"
  752.     continue
  753.  
  754.   elif [ "$ConfigNum" = "$ExchSparcSolarisNum" ] ; then
  755.  
  756.     InstallExchange sparcsolaris "$ExchSparcSolarisTar" \
  757.       "$SearchSparcSolarisTar" "$CustomSparcSolarisTar"
  758.     ExchSparcSolarisNum=""
  759.  
  760.   elif [ "$ConfigNum" = "$ReadSparcSolarisNum" ] ; then
  761.  
  762.     InstallReader sparcsolaris "$ReadSparcSolarisTar" \
  763.       "$SearchSparcSolarisTar" "$CustomSparcSolarisTar"
  764.     ReadSparcSolarisNum=""
  765.  
  766.   elif [ "$ConfigNum" = "$ExchSparcSunNum" ] ; then
  767.  
  768.     InstallExchange sparcsun "$ExchSparcSunTar" \
  769.       "$SearchSparcSunTar" "$CustomSparcSunTar"
  770.     ExchSparcSunNum=""
  771.  
  772.   elif [ "$ConfigNum" = "$ReadSparcSunNum" ] ; then
  773.  
  774.     InstallReader sparcsun "$ReadSparcSunTar" \
  775.       "$SearchSparcSunTar" "$CustomSparcSunTar"
  776.     ReadSparcSunNum=""
  777.  
  778.   elif [ "$ConfigNum" = "$ExchHppaHpuxNum" ] ; then
  779.  
  780.     InstallExchange hppahpux "$ExchHppaHpuxTar" \
  781.       "$SearchHppaHpuxTar" "$CustomHppaHpuxTar"
  782.     ExchHppaHpuxNum=""
  783.  
  784.   elif [ "$ConfigNum" = "$ReadHppaHpuxNum" ] ; then
  785.  
  786.     InstallReader hppahpux "$ReadHppaHpuxTar" \
  787.       "$SearchHppaHpuxTar" "$CustomHppaHpuxTar"
  788.     ReadHppaHpuxNum=""
  789.  
  790.   elif [ "$ConfigNum" = "$ExitNum" ] ; then
  791.  
  792.     break
  793.  
  794.   else
  795.  
  796.     echo " "
  797.     echo "ERROR: Invalid response ... try again"
  798.     continue
  799.  
  800.   fi
  801.  
  802.   if [ "$DefaultConfig" ] ; then
  803.     break;
  804.   fi
  805.  
  806.   if [ -z "$MultipleInstall" ] ; then
  807.     break;
  808.   fi
  809.  
  810.   NumConfigs=`expr $NumConfigs - 1`
  811.  
  812. done
  813.  
  814.  
  815. echo " "
  816. exit 0
  817.  
  818.